package com.letv.core.constant;

import android.util.DisplayMetrics;

import com.letv.core.utils.LogInfo;

/**
 * 常量
 * 
 * @author zhuqiao
 * 
 */
public class LetvConstant {

    public interface STREAM_LEVEL {

        int LOW_STREAM = 0; // 流畅

        int STANDARD_STREAM = 2; // 标清

        int HD_STREAM = 1; // 高清
    }

    /**
     * 播放手机平台
     */
    public static final String MOBILE_SYSTEM_PHONE = "420003";
    /**
     * 播放手机外跳平台
     */
    public static final String MOBILE_SYSTEM_PHONE_JUMP = "420004";
    /**
     * 付费手机付费
     */
    public static final String MOBILE_SYSTEM_PHONE_PAY = "141003";
    /**
     * 常量信息,每次请求频时的条数
     */
    public static final int PAGE_SIZE = 20;

    public static final int THREADPOOL_SIZE = 3;
    /**
     * 发送短信找回密码 手机号
     */
    public static final String retrievePwdPhoneNum = "10690228102921";// "95131292121";
    /**
     * webactivity加载网页的type
     */
    public final static String retrieve_pwd_byemail_url = "http://sso.letv.com/user/backpwdemail";
    /**
     * 乐视协议url
     */
    public final static String USER_PROTOCOL_URL = "http://sso.letv.com/user/protocol";
    /**
     * about us url
     */
    public final static String ABLUT_US_URL = "http://m.letv.com/";
    /**
     * 乐视商城url
     */
    public static String LETV_SHOP_URL = "http://shop.letv.com/";
    /**
     * 卸载反馈链接http://upload.app.m.letv.com/android/static/uninstall_question.html
     */
    public static String LETV_UNINSTALL_URL = "http://upload.app.m.letv.com/android/static/uninstall_question.html?";

    /**
     * 来源M站,app下载url
     */
    public final static String APP_DOWNLOAD_URL  = "http://m.letv.com/client/download.php?ref=3017 ";
    /**
     * 频道列表每页请求数据
     */
    public static final int CHANNEL_LIST_PAGE_SIZE = 30;
    /**
     * 精品推荐列表每页请求数据
     */
    public static final int RECOMMEND_LIST_PAGE_SIZE = 30;
    /**
     * 用来记录播放记录播放完成
     */
    public static final int PLAY_FINISH = -1000;

    public static final int WIDGET_UPDATE_UI_TIME = 15 * 1000;

    public static final boolean USE_SDCARD = true;

    public static final boolean USE_MEMORY = true;

    public static final long VIP_OVERDUE_TIME = 86400; // 24 * 60 * 60

    /*
     * 过期天数计算因子
     */
    public static final long OVERDUE_TIME_IN_SECS = 86400000; // 24 * 60 * 60 * 1000


    /**
     * 没有网络
     */
    public static final int NET_NO = 0;
    /**
     * 请求网络数据返回状态
     */
    public static final String STATUS_OK = "1";

    /**
     * 网络连接错误
     */
    public static final int NET_ERROR = 1;
    /**
     * 数据为空
     */
    public static final int DATA_NULL = 2;

    /**
     * 下载页面分为正在下载，完成下载。若为true，则为完成下载页面,默认为完成下载界面
     */
    // public static boolean DOWNLOAD_FINISH_PAGE = true;

    /**
     * FLURRY
     */
    // public static final String FLURRY_API_KEY = "TFLG6X757KI8QBRICMPM";
    // public static final String FLURRY_API_KEY = "C6HTNMTYKPNH5VB2YBJ2";

    /**
     * 艾德聚合
     */
    public static final String AD_PublishId = "e084144fd78c42c5878e3277606f8b6e";

    public static final int LETV_LIVEBOOK_CODE = 250250250;
    /***
     * 抢兑活动code
     */
    public static final int LETV_QDACTIVITY_CODE = 250250251;
    /**
     * 每2分钟刷新数据
     */
    public static final long REFRESH_TIME = 120 * 1000;
    /**
     * 直播加密密钥
     */
    public static final String MIYUE = "a2915e518ba60169f77";
    /**
     * 5.3增加的加密密钥，付费、用户相关接口增加加密串
     * 详细参考接口文档：
     * 到期提醒优惠接口： http://wiki.letv.cn/pages/viewpage.action?pageId=23795915
     * 手机号验证接口： http://wiki.letv.cn/pages/viewpage.action?pageId=23791107
     * 手机支付结果查询接口： http://wiki.letv.cn/pages/viewpage.action?pageId=23791169
     * 手机话费支付接口： http://wiki.letv.cn/pages/viewpage.action?pageId=23791165
     * 消费记录接口： http://wiki.letv.cn/pages/viewpage.action?pageId=23796175
     */
    public static final String MIYUE53 = "poi345";

    public static final String MIYUE_ATTENDANCE = "9cce0cb830bbd61b8b7408599034051a";
    private static boolean isForcePlay=  false;

    /**
     * Video正片的videoTypeKey值：180001
     */
    public static final String VIDEO_TYPE_KEY_ZHENG_PIAN = "180001";
    
    //聊天室加密key
  	public static final String CHAT_KEY = "4D2sP9BV7vCs8AL";

    /**
     * 应用程序用到的意图
     */

    public static class Intent {

        public static class Bundle {
            public static final String PLAY = "play_parameter"; // 进入播放页时，intent中传递参数的bundle键
            public static final String PCODE = "pcode";         // 打开小窗播放时，传入其中的pcode
            public static final String VERSION = "version";     // 打开小窗播放时，传入其中的version
            public static final String DEVICEID = "deviceId";
            public static final String VIDEO_FORMAT = "video_format"; // 打开小窗播放时，传入的视频格式 mp4或其他
            public static final String LAUNCH_MODE = "launch_mode";
        }
    }

    /**
     * 整个应用程序运行过程中用到的数据
     */
    public static class Global {
//        public static final String DEVICEID = LetvUtils.generateDeviceId(BaseApplication.getInstance());
//        public static final DisplayMetrics displayMetrics = BaseApplication.getInstance().getResources().getDisplayMetrics();
        public static final DisplayMetrics displayMetrics = null;

//        public static final String PCODE = LetvTools.getPcode();

//        public static final String VERSION = LetvTools.getClientVersionName();
        /**
         * 客户端版本号--68
         */
//        public static final int VERSION_CODE = LetvTools.getClientVersionCode();
    }

   

    public interface Menu {

        int PLAY = 0;

        int DELETE = 1;

        int CLEAR = 2;

        int START_ALL = 3;

        int PAUSE_ALL = 4;

        int ATTRIBUTE = 5;

    }

    public interface TextColor {

        int ORDER_TEXT_SELECED_COLOR = 0xfffaf0ed;

        int ORDER_TEXT_NORMAL_COLOR = 0xffb1b1b1;

        int SEARCH_SORT_SELECTED = 0xff3f3f3f;

        int SEARCH_SORT_NORMAL = 0x00000000;
    }

    public class DialogMsgConstantId {
        public static final String TWO_ZERO_ONE_CONSTANT = "201";
        public static final String TWO_ZERO_TWO_CONSTANT = "202";
        public static final String TWO_ZERO_THREE_CONSTANT = "203";
        public static final String TWO_ZERO_FIVE_CONSTANT = "205";
        public static final String TWO_ZERO_SIX_CONSTANT = "206";
        public static final String TWO_ZERO_SEVEN_CONSTANT = "207";

        public static final String FOUR_ZERO_ONE_CONSTANT = "401";
        public static final String FIVE_ZERO_ONE_CONSTANT = "501";
        public static final String SIX_ZERO_TWO_CONSTANT = "602";

        public static final String SEVEN_ZERO_TWO_CONSTANT = "702";
        public static final String SEVEN_ZERO_FOUR_CONSTANT = "704";
        public static final String SEVEN_ZERO_FIVE_CONSTANT = "705";
        public static final String SEVEN_ZERO_SEVEN_CONSTANT = "707";

        public static final String NINE_ZERO_TWO_CONSTANT = "902";
        public static final String TEN_ZERO_ONE_CONSTANT = "1001";
        public static final String TEN_ZERO_TWO_CONSTANT = "1002";

        public static final String ELEVEN_ZERO_ONE_CONSTANT = "1101";
        public static final String TWELVE_ZERO_ONE_CONSTANT = "1201";
        public static final String THIRTEEN_ZERO_ONE_CONSTANT = "1301";

        public static final String FOURTEEN_ZERO_ONE_CONSTANT = "1401";
        public static final String FOURTEEN_ZERO_TWO_CONSTANT = "1402";
        public static final String FOURTEEN_ZERO_THREE_CONSTANT = "1403";
        public static final String FOURTEEN_ZERO_FOUR_CONSTANT = "1404";
        public static final String FOURTEEN_ZERO_FIVE_CONSTANT = "1405";
        public static final String FOURTEEN_ZERO_SIX_CONSTANT = "1406";
        public static final String FOURTEEN_ZERO_SEVEN_CONSTANT = "1407";
        public static final String FOURTEEN_ZERO_EIGHT_CONSTANT = "1408";
        public static final String FOURTEEN_ZERO_NINE_CONSTANT = "1409";
        public static final String FOURTEEN_TEN_CONSTANT = "1410";
        public static final String FOURTEEN_FOURTEEN_CONSTANT = "1414";
        public static final String FOURTEEN_FIFTEEN_CONSTANT = "1415";
        public static final String FOURTEEN_SIXTEEN_CONSTANT = "1416";

        public static final String FIFTEEN_ZERO_ONE_CONSTANT = "1501";
        public static final String FIFTEEN_ZERO_TWO_CONSTANT = "1502";
        public static final String FIFTEEN_ZERO_FIVE_CONSTANT = "1505";
        public static final String FIFTEEN_ZERO_SIX_CONSTANT = "1506";
        public static final String FIFTEEN_ELEVEN_CONSTANT = "1511";

        public static final String SIXTEEN_ZERO_ONE_CONSTANT = "1601";
        public static final String SIXTEEN_ZERO_TWO_CONSTANT = "1602";
        public static final String SIXTEEN_ZERO_FOUR_CONSTANT = "1604";

        public static final String SEEVENTEEN_ZERO_THREE_CONSTANT = "1703";

        public static final String TWENTYONE_ZERO_ONE_CONSTANT = "2101";
        public static final String TWENTYONE_ZERO_TWO_CONSTANT = "2102";
        public static final String TWENTYTWO_ZERO_ONE_CONSTANT = "2201";

        public static final String TWENTYTHREE_ZERO_THREE_CONSTANT = "2303";
        public static final String TWENTYFOUR_ZERO_ONE_CONSTANT = "2401";
        public static final String TWENTYFOUR_ZERO_TWO_CONSTANT = "2402";
        public static final String TWENTYFOUR_ZERO_FIVE_CONSTANT = "2405";

        public static final String TWENTYFIVE_ZERO_ONE_CONSTANT = "2501";

        public static final String CONSTANT_2601 = "2601";
        public static final String CONSTANT_2701 = "2701";
        public static final String CONSTANT_2702 = "2702";
        public static final String CONSTANT_2703 = "2703";
        public static final String CONSTANT_2704 = "2704";
        public static final String CONSTANT_2705 = "2705";

        public static final String CONSTANT_50002 = "50002";
        public static final String CONSTANT_50102 = "50102";
        public static final String CONSTANT_50208 = "50208";
        public static final String CONSTANT_50301 = "50301";
        public static final String CONSTANT_50601 = "50601";
        public static final String CONSTANT_50602 = "50602";
        public static final String CONSTANT_50902 = "50902";
        public static final String CONSTANT_70005 = "70005";
        public static final String CONSTANT_70007 = "70007";
        public static final String CONSTANT_70008 = "70008";
        public static final String CONSTANT_70009 = "70009";
        public static final String CONSTANT_70010 = "70010";
        public static final String CONSTANT_70011 = "70011";
        public static final String CONSTANT_70012 = "70012";
        public static final String CONSTANT_70016 = "70016";
        public static final String CONSTANT_70013 = "70013";
        public static final String CONSTANT_70014 = "70014";
        public static final String CONSTANT_70015 = "70015";

        // 短信注册号码
        public static final String CONSTANT_90001 = "90001";
        // 密码找回号码
        public static final String CONSTANT_90002 = "90002";

        // modified by zengsonghai 20140211 会员到期提醒-----start
        public static final String CONSTANT_10000 = "10000";
        public static final String CONSTANT_10001 = "10001";
        public static final String CONSTANT_10002 = "10002";
        public static final String CONSTANT_100016 = "100016";
        // modified by zengsonghai 20140211 会员到期提醒-----end

        // add by zhanglibin on 20140227 toast提示语 ------start
        public static final String CONSTANT_20001 = "20001";
        public static final String CONSTANT_20002 = "20002";
        public static final String CONSTANT_20003 = "20003";
        public static final String CONSTANT_20004 = "20004";
        public static final String CONSTANT_20005 = "20005";
        public static final String CONSTANT_20006 = "20006";
        public static final String CONSTANT_20007 = "20007";
        public static final String CONSTANT_20008 = "20008";
        public static final String CONSTANT_20009 = "20009";
        public static final String CONSTANT_20010 = "20010";
        public static final String CONSTANT_100062 = "100062";// 收藏成功使用100062,去掉20009

        /**
    	 * 正在加载，请稍候…
    	 */
    	public static final String ON_LOADING = "100001";
    	
    	/**
    	 * 网络不流畅，建议降低清晰度观看
    	 */
    	public static final String BLOCK_SUGGEST_SWITCH_LOW = "100002";
    	
    	/**
    	 * 因版权方要求，此视频仅支持在中国大陆播放
    	 */
    	public static final String NO_PLAY_ONLY_CHINA = "110020";
        
        // add by zhanghongfei start
        /**
         * 已解锁
         */
        public static final String PLAY_OPERATION_UNLOCK = "100032";

        /**
         * 已锁定
         */
        public static final String PLAY_OPERATION_LOCK = "100033";
        // add by zhanghongfei end
        public static final String CONSTANT_111101 = "111101";
        public static final String CONSTANT_80003 = "80003";
        // add by zhanglibin on 20140227 toast提示语 ------end
        /**
         * 分享文案
         */
        public static final String CONSTANT_20024 = "20024";
        /**
         * 登录加速提醒文案标识
         */
        public static final String CONSTANT_20025 = "20025";

        /**
         * 简介底部图片----30001
         * 选集底部图片----30002
         * 相关底部图片----30003
         * 分享底部图片----30004
         */
        public static final String CONSTANT_30001 = "30001";
        public static final String CONSTANT_30002 = "30002";
        public static final String CONSTANT_30003 = "30003";
        public static final String CONSTANT_30004 = "30004";

        /**
         * 下载选集下侧显示“您也可以下载到Pad端，TV端，电脑端>”此处的banner可通过后台控制是否显示
         */
        public static final String CONSTANT_111102 = "111102";
        public static final String CONSTANT_30006 = "30006";
        public static final String CONSTANT_50001 = "50001";
        /**
         * QQ群，动态控制
         */
        public static final String CONSTANT_90003 = "90003";
        /**
         * 强制提醒内容
         */
        public static final String CONSTANT_90004 = "90004";
        /**
         * 强制提醒间隔时间和提醒时间
         */
        public static final String CONSTANT_90005 = "90005";
        /**
         * 强制提醒开关1为开，0为关
         */
        public static final String CONSTANT_90006 = "90006";

        // public static final String CONSTANT_100016 = "100016";

        public static final String RECOMMEND = "70006";
        public static final String FEEDBACKURI = "80001";

        // 邀请要用
        public static final String INVITE_LEFT_BUTTON_TEXT = "90020";
        public static final String INVITE_CHECK_BUTTON_TEXT = "90018";
        public static final String INVITE_BOTTM_BUTTON_TEXT = "90019";
        public static final String INVITE_SWITCH = "90021";
        // 小时
        public static final String LONGTIME_TIP = "100029";

        // 播放器清晰度推广1080p图片地址
        public static final String CONSTANT_100026 = "100026";
        // 播放器清晰度推广4K图片地址
        public static final String CONSTANT_100027 = "100027";

        // 跳转小窗时，如果为3G网络，则toast提示
        public static final String JUMP_PIP_3G_PROMPT = "100028";
        
         //乐视商城URL   
        public static final String CONSTANT_100104 = "100104";
        // 播放器清晰度推广4K链接地址
        public static final String CONSTANT_100023 = "100023";
        // 播放器清晰度推广1080p链接地址
        public static final String CONSTANT_100022 = "100022";

        // 小窗显示开关
        public static final String PIP_LOCK = "100034";
        
        // 极速
        public static final String CONSTANT_100035 = "100035";
        // 流畅
        public static final String CONSTANT_100036 = "100036";
        // 标清
        public static final String CONSTANT_100037 = "100037";
        // 高清
        public static final String CONSTANT_100038 = "100038";
        /**
         * 问题反馈QQ群
         */
        public static final String CONSTANT_100058 = "100058";
        /**
         * 问题反馈乐迷社区
         */
        public static final String CONSTANT_100059 = "100059";
        /**
         * 播放记录登陆文字
         */
        public static final String CONSTANT_100061 = "100061";
        
        //5.8新加需求修改播放器现实码流
		public static final String STREAM_LOW= "100035";
		public static final String STREAM_STANDARD= "100036";
		public static final String STREAM_HD= "100037";
		public static final String STREAM_SUPERHD= "100038";
		public static final String LIVE_STREAM_ST= "100045";
		public static final String LIVE_STREAM_HD= "100046";

        /**
         * 正在为您切换清晰度...
         */
        public static final String SWITCH_STREAM = "100015";
        
    }

    public static class BrName {

        /**
         * 播放低码流名称
         * */
        public static String playLowName = "流畅";

        /**
         * 播放中码流名称
         * */
        public static String playNormalName = "高清";

        /**
         * 播放高码流名称
         * */
        public static String playHighName = "超清";

        /**
         * 下载低码流名称
         * */
        public static String downloadLowName = "流畅";

        /**
         * 下载中码流名称
         * */
        public static String downloadNormalName = "高清";

        /**
         * 下载高码流名称
         * */
        public static String downloadHighName = "超清";
    }

    /**
     * 通知Notification ID号
     */
    public interface NotificationID {
        int NOTIFY_DOWNLOAD_VIDEO = 1000;
    }
    
    /**
	 * 轮播台
	 * 
	 * 
	 */
	public enum SortType {
		SORT_BYNO, SORT_BYNEWTIME
	}
	
	public static boolean isForcePlay() {
        return isForcePlay;
    }

    public static void setForcePlay(boolean force) {
        isForcePlay = force;
        LogInfo.log("king","force = " +force);
    }
}
